/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package officeboost.domain;

import java.util.ArrayList;
import java.util.List;
import javax.ejb.Singleton;
import javax.persistence.PostPersist;

/**
 *
 * @author sorra
 */
@Singleton
public class LogMgr {
    private List<String> logs = new ArrayList<>();

    public List<String> getLogs() {
	return logs;
    }
    
    public void log(String s) {
	logs.add("<p>"+s+"</p>");
    } 
    
    @PostPersist
    public void logPersist(Object entity) {
	log(entity.toString() + " : persisted");
    }
}
